package com.mycompany.services.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import com.mycompany.optimizaproject.TipoIncidente;
import com.mycompany.optimizaproject.TipoIncidenteExtra;

public class TipoIncidenteExtraDAO extends AbstractHibernateDAO<TipoIncidenteExtra, Integer> {
	public TipoIncidenteExtraDAO(SessionFactory sessionFactory){
		setSessionFactory(sessionFactory);
	}
	
	@Override
	protected Class<TipoIncidenteExtra> getDomainClass() {
		return TipoIncidenteExtra.class;
	}
	
	@SuppressWarnings("unchecked")
	public List<TipoIncidenteExtra> tipoIncidenteExtraSegunTipoIncidente(int idTipoIncidente){
		return getHibernateTemplate().find("from TipoIncidenteExtra where idTipoIncidente=" + idTipoIncidente);
	}
}
